{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\ProgramData\\anaconda3\\lib\\site-packages\\akshare\\__init__.py:2812: UserWarning: 为了支持更多特性，请将 Pandas 升级到 2.2.0 及以上版本！\n",
      "  warnings.warn(\n"
     ]
    }
   ],
   "source": [
    "from data_feed import data_dzh, stock_zh_index_daily"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                 date   value\n",
      "date                         \n",
      "2024-06-20 2024-06-20 -1301.0\n",
      "2024-06-21 2024-06-21 -1355.0\n",
      "2024-06-24 2024-06-24 -1446.0\n",
      "2024-06-25 2024-06-25 -1550.0\n",
      "2024-06-26 2024-06-26 -1580.0\n"
     ]
    }
   ],
   "source": [
    "M5M60_file_path = 'M5M60.txt'  # 替换为你的文件路径\n",
    "data_M5M60 = data_dzh(M5M60_file_path)\n",
    "data_M5M60 = data_M5M60.read_and_convert_txt_to_dataframe()\n",
    "print(data_M5M60.tail())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                 date   value\n",
      "date                         \n",
      "2024-06-20 2024-06-20  -694.0\n",
      "2024-06-21 2024-06-21  -705.0\n",
      "2024-06-24 2024-06-24 -1043.0\n",
      "2024-06-25 2024-06-25 -1172.0\n",
      "2024-06-26 2024-06-26  -931.0\n"
     ]
    }
   ],
   "source": [
    "bwwmacd_file_path = 'macd.txt'  # 替换为你的文件路径\n",
    "data_bwwmacd = data_dzh(bwwmacd_file_path)\n",
    "data_bwwmacd = data_bwwmacd.read_and_convert_txt_to_dataframe()\n",
    "print(data_bwwmacd.tail())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                 date      open      high       low     close       volume\n",
      "date                                                                      \n",
      "2024-06-21 2024-06-21  2998.241  3011.914  2985.929  2998.138  25500125100\n",
      "2024-06-24 2024-06-24  2982.826  2990.643  2960.127  2963.099  29865388400\n",
      "2024-06-25 2024-06-25  2962.765  2971.653  2935.538  2949.996  27320993800\n",
      "2024-06-26 2024-06-26  2943.447  2976.669  2933.330  2972.525  28238840900\n",
      "2024-06-27 2024-06-27  2962.696  2963.064  2944.898  2945.852  27054851900\n"
     ]
    }
   ],
   "source": [
    "data_stock = stock_zh_index_daily(symbol=\"sh000001\")\n",
    "data_stock = data_stock.get_data()\n",
    "print(data_stock.tail())"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
